<template>
  <WujieVue name="cso-app" :url="url" :sync="true" :props="props"></WujieVue>
</template>

<script lang="ts" setup>
import { computed, onMounted, watch } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import WujieVue from "wujie-vue3";
const router = useRouter();


const props = {
  jump: router.push
}
const route = useRoute();
const url = "http://localhost:3001/" + route.params.path ? route.params.path : "";
watch(()=> route.params.path, (val)=>{

  WujieVue.bus.$emit('cso-router-change', `/${route.params.path}`)
}, {
  immediate: true
})

// onMounted(()=>{
//   WujieVue.bus.$emit('cso-router-change', `/${route.params.path}`)
// })
</script>

<style></style>
